package com.heima.article.controller;


import com.heima.article.entity.ApAuthor;
import com.heima.article.service.IApAuthorService;
import com.heima.common.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/author")
public class ApAuthorController {

    @Autowired
    private IApAuthorService apAuthorService;

    //保存文章作者
    @PostMapping
    public ResponseResult<ApAuthor> saveApAuthor(@RequestBody ApAuthor apAuthor) {
        return apAuthorService.saveApAuthor(apAuthor);
    }
}